<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>jquery当前日期</title>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
 $(function(){
  function show(){
   var mydate = new Date();
   var str = "" + mydate.getFullYear() + "年";
   str += (mydate.getMonth()+1) + "月";
   str += mydate.getDate() + "日";
   return str;
  }
  $("input[type='button']").click(function(){
   $("p").html("今天是 " + show());
  });
 });
</script>
</head>
<body>
<input type="button" value="看看现在的时间" />
<p></p>
</body>
</html>
